# -*- coding: utf-8 -*-
# @Author  : Pony
# @Time    : 2021/10/26 下午2:45

from business.redis_demo import RedisHelper
import time
import json

obj = RedisHelper(channel_name='to_server_test')
# while 1:
#     time.sleep(1.5)
#     obj.public(json.dumps({
#         'title': '开始',
#         'description': '已经下发任务'
#     }))


import time

for i in range(5):
    jj = obj.public(json.dumps({
        'title': '开始',
        'description': i
    }))

    print(jj)


obj.public(json.dumps({
    'title': '完成',
    'description': '77777'
}))

